/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.rainbowsheep.reisorg.rest.service.repository;

import java.util.List;
import nl.rainbowsheep.reisorg.rest.service.model.City;
import nl.rainbowsheep.reisorg.rest.service.model.Country;
import nl.rainbowsheep.reisorg.rest.service.model.Region;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * Repository voor cities
 */
public interface CityRepository extends JpaRepository<City, Long>{
       
    City findByName(String name); 
    
    List<City> findByCountryId(long countryId); 
    
    List<City> findByRegionId(long regionId); 
}
